Using the OCR Get Word Location Function

From version 7.2, you can return a list of coordinates of the rectangles that enclose a given word.

For details on the OCR functions, see Using the Advanced Picture Object and Using the Advanced PDF Object

To test the OCR Get Word Location function:

1. Ensure that the ABBYY FineReader Engine is installed.
2. Download the sample project here.
3. Copy the c012.jpg file to C:\TEMP.
4. The example includes a AdvPicture user instance of Advanced Picture base type, with a Boolean that you can use to trigger an event that executes the function.

5. The example includes an event handler that executes when the value of the Boolean is modified, and executes the Get Word Locations function.

6. As the result of the function is a list of Screen Element Rectangles, the results cannot be viewed directly in Monitor. In order to see the results in the log file, switch the VSD logger level to DEBUG in the RTClient.exe.config (browse to %AppData% and update the file in Nice_Systems\Real-Time).

7. Run the project.
8. Start Monitor.
9. In OCR_project2modify the Boolean value to True. The event is triggered.

10. Select AdvPicture to view the simple return values of the function.

11. Open the log\RTClient.log file to view the list of rectangle locations of the given word.